/* Endless Code Copyright (C) 2009 Jingul,Kim
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */
package ec.core.event;

import ec.util.Point;

/**
 * @since 2009
 * @version 1.0
 * @author <a href="mailto:jingul.kim@gmail.com">Jingul,Kim</a>
 */
public class MouseEvt extends Event {
	private int type;
	private int button;
	
	private float m_x;
	private float m_y;
	
	public static final int UP = 1;
	public static final int DOWN = 2;
	public static final int MOVE = 3;

	public static final int CLICK = 4;
	public static final int DBCLICK = 5;
	public static final int DRAG = 6; 
	
	public static final int LEFT = 1;
	public static final int MEDIUM = 2;
	public static final int RIGHT = 3;
	
	public MouseEvt(Object caster, int type, int button, float x, float y) {
		super(caster);
		
		this.type = type;
		this.button = button;

		m_x = x;
		m_y = y;
	}
	
	public float getX(){
		return m_x;
	}
	
	public float getY() {
		return m_y;
	}
	
	public Point getPoint() {
		return new Point(m_x, m_y);
	}
	
	public int getType() {
		return type;
	}
	
	public int getButton() {
		return button;
	}
}
